import Vue from 'vue'
import App from './App'
import store from './store'
import { getStore } from './store/store.js'

// 获取存储的 Token 并挂载到 Vue 实例的原型上
const token = uni.getStorageSync('token');
Vue.prototype.$token = token;


// 导入 API 函数
import { getCode, appRegister, loginUser, getInfo,allupload } from '@/utils/api/index.js'; 

// 将 API 函数挂载到 Vue 实例的原型上
Vue.prototype.$api = {
  getCode,
  appRegister,
  loginUser,
  getInfo,
  allupload
};

Vue.config.productionTip = false

App.mpType = 'app'

Vue.prototype.$toast = function(url){
	uni.navigateTo({
		url: url
	})
}
Vue.prototype.$userInfo = getStore("userInfo")
Vue.prototype.$collect = getStore("Collect")

const app = new Vue({
    ...App
})
app.$mount()
